#ifndef DependencyWriter_H
#define DependencyWriter_H
#include<iostream>
#include<fstream>
#include<string>
#include<cstdio>
#include"DependencyInstance.h"
using namespace std;

class DependencyWriter{
protected:
	FILE* writer;
	bool labeled;
	bool hasEnd;
public:
	static DependencyWriter* createDependencyWriter(string &format, bool lb, bool hasEnd);
	DependencyWriter();
	~DependencyWriter();
	void startWriting(const char* file);
	void finishWriting();
	bool isLabeled();
	virtual void write(vector<string*> &forms, vector<string*> &lemma, vector<string*> &cpos, vector<string*> &pos, vector<string*> &labs, vector<int> &heads);
};
#endif
